import {Component} from "react";

class ChildCmt extends Component{

   componentWillReceiveProps(nextProps, nextContext) {
       console.log('nextProps ==> '+JSON.stringify(nextProps));
       console.log("nextContext ==>"+JSON.stringify(nextContext));
   }

   //将要更新
    componentWillUpdate(nextProps, nextState, nextContext) {
       console.log('componentWillUpdate')
    }

    //更新完成
    componentDidUpdate(prevProps, prevState, snapshot) {
        console.log('componentDidUpdate')
    }


    render() {
        return(
            <div>
                <h4>这是子组件</h4>
            </div>
        )
    }
}

export default ChildCmt;